<?php
    ini_set("display_errors","1");
    require_once('config.php');
    require_once('global.php');
    session_id() || session_start();
    write_log("data:" . $_POST["data"]);
    b($data, "data", "");
    
    $data = json_decode($data);
    $act = $data->action;
    write_log("data:" . json_encode($data));
    $u = check_login();
    /*if($u === FALSE && $act != "login")
    {
        returnError(ErrorCode::NO_LOGIN);
        exit();
    }*/
        
    
    $flp=VIEW_DIR . (empty($ROUTER[$act]) ? "boast.php" : $ROUTER[$act]);
    if(file_exists($flp))
    {
        write_log("include file:" . $flp);
        include($flp);
    }
    else
    {
        returnError(MisErrorCode::PARAM_INVALID, "操作参数无效");
    }
?> 
